﻿using System;

namespace BizElements.Core
{
    /// <summary>Strategy/algorithm for entity DAO creation that can be registered and used in DAO factory.</summary>
    public interface IEntityDaoCreationStrategy
    {
        /// <summary>
        /// Gets DAO that will work the given entity.
        /// </summary>
        /// <param name="entity">Entity with wich the returned DAO works with.</param>
        /// <param name="conn">Connection context DAO will use. If null, default DAO settings are used.</param>
        /// <returns>IEntityDAO implementation.</returns>
        IEntityDAO GetEntityDAO(IEntity entity, IConnectionProvider conn);
    }	
}
